for x=1:1:128
    for y=1:1:128
        f(x,y)=50*sin(16*x)+50*sin(4*y);
    end
end

F=fft2(f);
S1=fftshift(F);
S=abs(S1,[])
imshow(S)

A=s(1:end);
plot(A)

i1=ifftshift(s);
i2=ifft2(i1);
imshow(i2,[])
I=abs(i2);
imshow(I,[])

for x=1:1:128
    for y=1:1:128
        f(x,y)=50*(sin(16*x)+1)+50*(sin(4*y)+1);
    end
end
A=fft2(f);
B=fftshift(A);
C=abs(B);
imshow(C)
K=ifft2(A);
imshow(K)



